package com.gitee.zhengjiasen.dp.proxy._static;

public class OrderDaoProxy implements IOrderDao {


    /**
     * 可通过构造器或者set方法进行设置.
     */
    private IOrderDao orderDao;

    /**
     * 通过构造器方法传入被代理对象
     *
     * @param orderDao
     */
    OrderDaoProxy(IOrderDao orderDao) {
        this.orderDao = orderDao;
    }

    @Override
    public void findOrderById(String id) {
        System.out.println("查询订单前做权限检查或日志记录等.");
        orderDao.findOrderById(id);
        System.out.println("查询订单后做日记记录等.");
    }
}
